/// @TOPDESC: hash tables implementation
/**
    this file implements in-memory hash tables with 
    `insert/del/replace/find/get-random-element` operations.
    Hash tables will auto resize if needed tables of power of two in size are used,
    collisions are handled by chaining. See the source code for more information.
 */

#ifndef GKO_POOL_INCLUDE_GP_DICT_H
#define GKO_POOL_INCLUDE_GP_DICT_H

#include <cstdint>

#ifdef __cplusplus
extern "C" {
#endif // cpp extern c

#define DICT_OK 0
#define DICT_ERR 1

#define DISCARD_IT(v) ((void) v) // (void) `var`, TODO: rename
#define DICT_HASH_FUNCTION_SEED 5381

typedef struct dictEntry
{
    void* key;
    union
    {
        void* val;
        uint64_t u64;
        int64_t s64;
    } v; // value 
    struct dictEntry* next; // next pointer
} dictEntry;




#ifdef __cplusplus
}
#endif // cpp extern c

#endif // header file protect